import request from '@/utils/request.js'
export function articlesInfo (id) {
  return request({
    url: `/v1_0/articles/${id}`
  })
}

export function userFollowings (target, bol = true) {
  if (bol) {
    // 关注
    return request({
      url: '/v1_0/user/followings',
      method: 'post',
      data: {
        target
      }
    })
  } else {
    // 取消关注
    return request({
      url: '/v1_0/user/followings/' + target,
      method: 'delete'
    })
  }
}
